#include <stdio.h>
#define SIZE 100

void quick_sort(int *arr,int l,int r)
{
	if(l >= r)
	{
		return;
	}
	if(r - l == 1)
	{
		if(arr[r] < arr[l])
		{
			int temp = arr[r];
			arr[r] = arr[l];
			arr[l] = temp;
		}
		return;
	}
	int key = arr[l],k = l;
	int lt = l + 1,rt = r,flag = 0;
	while(lt <= rt)
	{
		if(flag == 0)
		{
			if(arr[rt] < key)
			{
				arr[k] = arr[rt];
				k = rt;
				flag = 1;
			}
			rt--;
		}
		else
		{
			if(arr[lt] > key)
			{
				arr[k] = arr[lt];
				k = lt;
				flag = 0;
			}
			lt++;
		}
	}
	arr[k] = key;
	quick_sort(arr,l,k - 1);
	quick_sort(arr,k + 1,r);
}

int main()
{
	int arr[SIZE];
	for(int i = 0;i < SIZE;i++)
	{
		scanf("%d",&arr[i]);
	}
	quick_sort(arr,0,SIZE - 1);
	for(int i = 0;i < SIZE;i++)
	{
		printf("%d ",arr[i]);
	}
	printf("\n");
	return 0;
}
